package com.e3.web.widget.client;

import java.util.Map;

import com.extjs.gxt.ui.client.widget.Component;
import com.extjs.gxt.ui.client.widget.table.CellRenderer;

public class MyListCellRenderer<T extends Component> implements CellRenderer<T>{
	
	private Map<String,String> valueMaps;
	
	public MyListCellRenderer(Map<String,String> valueMaps){
		this.valueMaps = valueMaps;
	}

	public String render(T item, String property, Object value) {
		if(valueMaps==null){
			return null;
		}
		return valueMaps.get(String.valueOf(value));
	}

}
